from django.http import HttpResponse
from django.shortcuts import render

def index(request):
    print('给我一个首页。。。')


    #return HttpResponse('首页')
    context = {
        'name':'陈若涵',
        'sex':'女'
    }
    return render(request,'index.html',context)

from django.views import View

#类  视图 注册
class RegisterView(View):
    def get(self, request):


        return render(request, 'register.html')
    def post(self, request):



        return HttpResponse('注册成功')

    def delete(self, request):


        return HttpResponse('删除成功')
    def put(self, request):

        return HttpResponse('修改成功')